package com.gt.quality.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gt.quality.base.BaseCommonService;
import com.gt.quality.system.entity.SysUserRole;
import com.gt.quality.system.entity.vo.UserBindRole;
import com.gt.quality.base.pojo.BaseLimitRequest;
import com.gt.quality.base.pojo.LayerListViewObject;
import com.gt.quality.base.pojo.Resp;

import java.util.List;

/**
 * 用户和角色关联表(SysUserRole)表服务接口
 *
 * @author makejava
 * @since 2026-11-25 16:30:08
 */
public interface SysUserRoleService extends BaseCommonService<SysUserRole> {

    /**
     * Description:  分页查询
     *
     * @param limitRequest 分页查询参数
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     * @return:com.baomidou.mybatisplus.core.metadata.IPage
     */
    @Override
    IPage<SysUserRole> queryLimitPage(BaseLimitRequest<SysUserRole> limitRequest);


    /**
     * Description:  批量新增
     *
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     * @return:Integer
     */
    @Override
    Integer saveBatchByEasyBaseMapper(List<SysUserRole> entityList);

    /**
     * Description:  查询用户绑定的角色
     *
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     */
    Resp<LayerListViewObject> queryForUserId(String userId);

    /**
     * Description:  查询角色绑定的用户
     *
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     */
    Resp<Object> queryForRoleId(String roleId);

    /**
     * Description:  角色绑定用户
     *
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     */
    Resp<Boolean> roleBindUser(UserBindRole userBindRole);

    /**
     * Description:  角色解绑用户
     *
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     */
    Resp<Boolean> roleRemoveUser(UserBindRole userBindRole);
}


